home *** CD-ROM | disk | FTP | other *** search
/ Deutsche Edition 1 / Deutsche Edition 1.iso / amok / 071-080 / amok71 / vectorfont / vfonttest.mod < prev    next >
Text File  |  1993-11-04  |  2KB  |  55 lines

  1. (*------------------------------------------------------------------------------
  2.      :Program.    VFontTest.mod
  3.      :Contents.   Demo for VectorFont
  4.      :Author.     Matthias Scherrer
  5.      :Address.    Baselstrasse 63, CH-4242 Laufen
  6.      :Phone.      ++(0)61/893975
  7.      :Copyright.  PD
  8.      :Language.   Oberon
  9.      :Translator. Oberon V2.13d
  10.      :History.    V1.0,10-Apr-92
  11. ------------------------------------------------------------------------------*)
  12.  
  13. MODULE VFontTest;
  14.  
  15. IMPORT  I   : Intuition,
  16.         G   : Graphics,
  17.         D   : Dos,
  18.         sys : SYSTEM,
  19.         vf  : VectorFont;
  20.  
  21. VAR
  22.   ns     : I.NewScreen;
  23.   screen : I.ScreenPtr;
  24.   rp     : G.RastPortPtr;
  25.   b      : BOOLEAN;
  26.   i      : INTEGER;
  27.   s      : REAL;
  28.  
  29. BEGIN
  30.   ns.width     :=640;
  31.   ns.height    :=512;
  32.   ns.depth     :=1;
  33.   ns.viewModes :=SET{G.hires,G.lace};
  34.   ns.type      :=I.customScreen;
  35.   screen       :=I.OpenScreen(ns);
  36.  
  37.   IF screen#NIL THEN
  38.     rp:=sys.ADR(screen.rastPort);
  39.     vf.WriteString(rp,30,50,"Fonts sind beliebig Skalierbar!",0.4,1);
  40.     vf.WriteString(rp,30,10,"Font-Demo (c) 1992 by Matthias Scherrer",0.8,0.4);
  41.     vf.WriteString(rp,30,100,"Sonderzeichen: {\|~}*1230...!?",1.1,1.6);
  42.     vf.WriteString(rp,30,170,"Oberon",6,3);
  43.     vf.WriteString(rp,300,50,"auch ganz klein!",0.5,0.25);
  44.     i:=33; s:=0.05;
  45.     REPEAT
  46.       vf.Write(rp,10+(i-33)*SHORT(ENTIER(vf.width*s)),320,CHR(i),s,s);
  47.       s:=s+0.1;
  48.       INC(i);
  49.     UNTIL i>54;
  50.     vf.WriteString(rp,100,400,"Have Fun!",3,3);
  51.     D.Delay(800);
  52.     b:=I.CloseScreen(screen); 
  53.   END;
  54. END VFontTest.
  55.